import request from '@/utils/request'

// 分页
export function pagingAttribute(query) {
  return request({
    url: '/custom/customAttribute/paging',
    method: 'get',
    params: query
  })
}

// 列表
export function listAttribute(query) {
  return request({
    url: '/custom/customAttribute/list',
    method: 'get',
    params: query
  })
}

// 根据属性id获取属性数据
export function getAttribute(attributeId) {
  return request({
    url: '/custom/customAttribute/get',
    method: 'get',
    params: { attributeId }
  })
}

// 保存
export function saveAttribute(data) {
  return request({
    url: '/custom/customAttribute/save',
    method: 'post',
    data: data
  })
}

// 排序移动
export function doMoveUpdate(query) {
  return request({
    url: '/custom/customAttribute/doMove',
    method: 'get',
    params: query
  })
}

// 删除
export function deleteAttribute(data) {
  return request({
    url: '/custom/customAttribute/delete',
    method: 'post',
    data: data
  })
}
